home *** CD-ROM | disk | FTP | other *** search
/ The Disc - MacWorld 1995 / PowerComputing (The Disc)(MacWorld 1995).ISO / mac / CDFACTOR / HCfactor / HumanCode / HumanCode.DXR / 00049_QTMovie parent for Mac.ls < prev    next >
Encoding:
Text File  |  1995-07-14  |  2.0 KB  |  99 lines

  1. property movieid, duration, movieLoc, movieRect
  2.  
  3. on birth me
  4.   set movieid to EMPTY
  5.   set duration to EMPTY
  6.   set movieLoc to EMPTY
  7.   set movieRect to EMPTY
  8.   return me
  9. end
  10.  
  11. on QTPlay me
  12.   if movieid <> EMPTY then
  13.     qtmovie("Direct", movieid, "play")
  14.   end if
  15. end
  16.  
  17. on QTPause me
  18.   if movieid <> EMPTY then
  19.     qtmovie("Direct", movieid, "pause")
  20.   end if
  21. end
  22.  
  23. on QTDispose me
  24.   if movieid <> EMPTY then
  25.     qtmovie("Direct", movieid, "Dispose")
  26.     set movieid to EMPTY
  27.     set duration to EMPTY
  28.     set movieLoc to EMPTY
  29.     set movieRect to EMPTY
  30.   end if
  31. end
  32.  
  33. on QTIdle me
  34.   qtmovie("Direct", movieid, "Idle")
  35. end
  36.  
  37. on QTOpenMovie me, theFilePath, theRect
  38.   qtmovie("OpenMovie", "Direct", theFilePath, "0,-480", "Invisible", "Paused")
  39.   set movieid to the result
  40.   qtmovie("Direct", movieid, "get", "duration")
  41.   set duration to integer(the result)
  42.   qtmovie("Direct", movieid, "set", "movieRect", theRect)
  43.   set movieRect to theRect
  44.   return movieid
  45. end
  46.  
  47. on QTSetAudioLevel me, theLevel
  48.   if movieid <> EMPTY then
  49.     qtmovie("Direct", movieid, "set", "audioLevel", theLevel)
  50.   end if
  51. end
  52.  
  53. on QTSetRect me, theRect
  54.   qtmovie("Direct", movieid, "set", "movieRect", theRect)
  55. end
  56.  
  57. on QTSetCurrTime me, theTime
  58.   qtmovie("Direct", movieid, "set", "currTime", theTime)
  59. end
  60.  
  61. on QTSetTimeCallBack me, theHandle, theTime
  62.   qtmovie("Direct", movieid, "set", "timedCallBack", theHandle && theTime)
  63. end
  64.  
  65. on QTGetCurrtime me
  66.   qtmovie("Direct", movieid, "get", "Currtime")
  67.   return integer(the result)
  68. end
  69.  
  70. on QTgetrect me
  71.   qtmovie("Direct", movieid, "get", "movieRect")
  72.   return the result
  73. end
  74.  
  75. on QTGetLoc me
  76.   qtmovie("Direct", movieid, "get", "movieLoc")
  77.   set movieLoc to the result
  78.   return movieLoc
  79. end
  80.  
  81. on QTGetDuration me
  82.   qtmovie("Direct", movieid, "get", "duration")
  83.   set duration to integer(the result)
  84.   return duration
  85. end
  86.  
  87. on qtrefresh me
  88.   if movieid <> EMPTY then
  89.     qtmovie("Direct", movieid, "get", "movieLoc")
  90.     qtmovie("Direct", movieid, "set", "movieLoc", the result)
  91.   end if
  92. end
  93.  
  94. on QTaway me
  95. end
  96.  
  97. on QTreturn me
  98. end
  99.